<template>
    <div class="person">
        <p>中国</p>
        <p id="title2" ref="title2">北京</p>
        <p>尚硅谷</p>
        <button @click="showLog">点我输出h2这个元素</button>
        <button @click="renTest">Com-page</button>
        <com-page ref="ren"></com-page>
    </div>
</template>
<script lang="ts" setup name="Person">
import { ref,watch, watchEffect} from 'vue';
import ComPage from './ComPage.vue';
let title2= ref();
let a = ref(0);

console.log(title2)
console.log(a)

let ren= ref();
console.log('ren ',ren)
function showLog(){
  console.log(title2.value)
}
function renTest(){
    console.log(ren.value)
}

</script>

<style lang="scss" scoped>

</style>